package com.atguigu.yygh.mq.config;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 配置消息转换器
 */
@Configuration //表示当前的类是个配置类
public class MessageConverterConfig {

    @Bean //将当前对象放到ioc容器
    public MessageConverter getMessageConverter(){
        return new Jackson2JsonMessageConverter();
    }
}